package com.fourth.shopping.mapper;


import com.fourth.shopping.entity.Item;
import com.fourth.shopping.vo.PageCondition;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ItemMapper {
    List<Item> getAllItems();

    Item getItemType(Integer goodsId);

    List<Item> getAllType();

    List<Item> getItemAsPage(@Param("condition") PageCondition condition);

    Integer getAllItemsSize();

    void addNewItem(@Param("item") Item item);

    void deleteItem(@Param("id") Integer id);

    void modifyItem(@Param("item") Item item);

    Item getItemById(@Param("id") String id);
}